package cn.cnf.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

/**
 * @author ZhuMeiYi
 * @date 2020/12/24 20:53
 * @description 将自定义的配置内容读取到静态
 */

@Configuration
public class StaticConfig {

    /**
     * 绝对路径和相对路径均从配置文件中读取
     */
    public static String localPath;
    public static String relativePath;

    @Value("${imgConfig.localPath}")
    public void setLocalPath(String localPath) {
        this.localPath = localPath;
    }

    @Value("${imgConfig.relativePath}")
    public void setRelativePath(String relativePath) {
        this.relativePath = relativePath;
    }
}
